<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
	pageEncoding="ISO-8859-1"%>
<%@page import="com.dai.uvs.data.Equipment"%>
<%@page import="com.dai.uvs.model.DataManager"%>
<%@ page import="java.util.ArrayList"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Suggest</title>
</head>
<body>
	<%
		String suggestsword = request.getParameter("suggestword")
				.toLowerCase();
		System.out.println("The Para is: " + suggestsword);
		DataManager showData = new DataManager();
		showData = (DataManager) request.getSession().getAttribute(
				"dataManager");
		System.out.println("DataManager:" + showData);
		ArrayList<Equipment> text = new ArrayList<Equipment>(
				showData.getGesamt(suggestsword));
		System.out.println("text" + text.size());
		
		out.println("<table width='100%' border='0' cellpadding='0' cellspacing='0'>");
		for (Equipment e : text) {
			if (e.getDEQT_TEXT().startsWith(suggestsword)) {
				out.print("<tr><td>"+e.getDEQT_TEXT()+"</td></tr>");

			}
		}
		 out.println("</table>");
	%>

	<%-- <p> Gefunden daten : <%=text.size()%></p>
	<table id="table">
		<c:forEach var="text" items="${text}">
			<c:if test="${text.DEQT_TEXT.startsWith(suggestsword)}">
				<tr>
					<td>${text.DEQT_TEXT}</td>
				</tr>
			</c:if>
		</c:forEach>

	</table>  --%>
</body>
</html>